<html>
<head><meta charset="utf-8"><title>Uplift `drop-bounds` lint from clippy int… compiler-team#347 · t-compiler/major changes · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/index.html">t-compiler/major changes</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html">Uplift `drop-bounds` lint from clippy int… compiler-team#347</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207470240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207470240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207470240">(Aug 19 2020 at 22:46)</a>:</h4>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/347">#347</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>



<a name="207472069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207472069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Howell <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207472069">(Aug 19 2020 at 23:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="261224">triagebot</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347/near/207470240">said</a>:</p>
<blockquote>
<p>A new proposal has been announced: <a href="https://github.com/rust-lang/compiler-team/issues/347">#347</a>. It will be announced at the next meeting to try and draw attention to it, but usually MCPs are not discussed during triage meetings. If you think this would benefit from discussion amongst the team, consider proposing a design meeting.</p>
</blockquote>
<p>The reason this lint is set as warn, instead of deny like in Clippy, is to avoid breaking libraries like pin-project that use the trait coherence rules to prevent client crates from implementing Drop. And it's not like T: Drop is UB or anything, just useless most of the time.</p>
<p>If you're using T: Drop correctly, then you know why this lint exists and know enough to disable it. But I don't want to break too much existing code. Does anybody know how this will interact with pin-project?</p>



<a name="207493505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207493505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207493505">(Aug 20 2020 at 06:48)</a>:</h4>
<p>we can make it <code>deny</code>, dependencies' lints are capped to <code>allow</code> anyway, so only building the crate directly will make you see the lint</p>



<a name="207504738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207504738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207504738">(Aug 20 2020 at 09:35)</a>:</h4>
<p>Meta-Meta: the same "warn vs deny" issue came up with CString lint as well. Do we have lint level policy written down somewhere? It seems like it's a better process to mechanically decide by looking at the flow chart, rather than debate in each particular case. </p>
<p>Meta: I <em>think</em> rustc and clippy should use different criteria for <code>deny</code>. To me it seems that both lints should be deny in clippy and warn in rustc -- they are likely bugs, but not something invalid according to language per se.</p>



<a name="207523582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207523582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207523582">(Aug 20 2020 at 13:45)</a>:</h4>
<p>Note that the linked forum post _does_ link to a valid use-case for this kind of bound.</p>



<a name="207523731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207523731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207523731">(Aug 20 2020 at 13:47)</a>:</h4>
<p>and overall, I wonder, is there another way to prevent users from implementing/instantiating something for <code>Copy</code> types without bounding on <code>Drop</code>?</p>



<a name="207528890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207528890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207528890">(Aug 20 2020 at 14:34)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> <span class="user-mention" data-user-id="124288">@oli</span> during the clippy 1.0 rfc this was already kinda decided, clippy deny lints rougly match up to rustc warn lints (very few rustc lints are deny)</p>



<a name="207528905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207528905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207528905">(Aug 20 2020 at 14:35)</a>:</h4>
<p>that said, not against making it deny</p>



<a name="207531412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207531412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207531412">(Aug 20 2020 at 14:55)</a>:</h4>
<p>I was mainly commenting on the fact that even <code>deny</code> is not a breaking change for dependencies</p>



<a name="207531426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207531426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207531426">(Aug 20 2020 at 14:55)</a>:</h4>
<p>I'm totally good with <code>warn</code></p>



<a name="207535042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207535042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207535042">(Aug 20 2020 at 15:23)</a>:</h4>
<blockquote>
<p>Do we have lint level policy written down somewhere?</p>
</blockquote>
<p><a href="https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-levels">https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-levels</a></p>
<p>(See the top of that chapter for other guidelines, style, lint vs fixed diagnostic, etc.)</p>



<a name="207535108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/207535108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#207535108">(Aug 20 2020 at 15:23)</a>:</h4>
<p>(Scroll down a bit for lint <em>levels</em>)</p>



<a name="208144529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/208144529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael Howell <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#208144529">(Aug 26 2020 at 20:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347/near/207493505">said</a>:</p>
<blockquote>
<p>we can make it <code>deny</code>, dependencies' lints are capped to <code>allow</code> anyway, so only building the crate directly will make you see the lint</p>
</blockquote>
<p>pin-project is using drop bounds in a macro</p>



<a name="210397963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/210397963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#210397963">(Sep 17 2020 at 14:30)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="492">@T-compiler</span>: Proposal <a href="https://github.com/rust-lang/compiler-team/issues/347#issuecomment-694275482">#347</a> has been seconded, and will be approved in 10 days if no objections are raised.</p>



<a name="211848371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/233931-t-compiler/major%20changes/topic/Uplift%20%60drop-bounds%60%20lint%20from%20clippy%20int%E2%80%A6%20compiler-team%23347/near/211848371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> triagebot <a href="https://rust-lang.github.io/zulip_archive/stream/233931-t-compiler/major-changes/topic/Uplift.20.60drop-bounds.60.20lint.20from.20clippy.20int.E2.80.A6.20compiler-team.23347.html#211848371">(Sep 30 2020 at 22:30)</a>:</h4>
<p>This proposal has been accepted: <a href="https://github.com/rust-lang/compiler-team/issues/347">#347</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>